<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

<?php

$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'data-grid',
    'dataProvider' => $model->search(),
    //'dataProvider' => new CArrayDataProvider($dataProvider, array()),
    'type' => TbHtml::GRID_TYPE_HOVER,
    //'filter'=>$model,
    //'template' => "{items}",
    //'filter' => $model,
    //'cssFile' => Yii::app()->theme->baseUrl . '/css/gridView.css',
    //'pager' => array('class' => 'foundation.widgets.FounPager'),
    'columns' => array(
        array(
            'header'=>Yii::t("App", "#"),
            'value' => '$data[id]',
            'htmlOptions' => array('class' => 'text'),
        ),array(
            'header'=>Yii::t("App", "Num. Registro"),
            'value' => '$data[numRegistro]',
            'htmlOptions' => array('class' => 'text'),
        ), array(
            'header'=>Yii::t("App", "Dueño"),
            'value' => '$data[dueno]',
            'htmlOptions' => array('class' => 'text'),
        ), array(
            'header'=>Yii::t("App", "Barrio"),
            'value' => '$data->ValoresUnitariosTerrenosUrbanos->barrio',
            'htmlOptions' => array('class' => 'text'),
        ), array(
            'header'=>Yii::t("App", "Costo Total Catastral Bien Inmueble"),
            'value' => "'C$ '.number_format(".'$data->ctcbi'.",2,'.',',')",
//'$data->ctcbi', //number_format($data->ctcbi,2,'.',','),
            'htmlOptions' => array('style' => 'text-align:right;'),

        ),
        array(
            'class' => 'CButtonColumn',
            'template' => '{delete}{pdf}',
            'buttons' => array(
                'delete' => array(
                    'imageUrl' => Yii::app()->theme->baseUrl .'/icons/trashBW.png'
                ),
                'pdf' => array(
                    'url' => 'Yii::app()->createUrl("/site/PDF", array("id"=>$data->id))',// '/graph/crashes/idcrash/',
                    //'imageUrl' => Yii::app()->theme->baseUrl . '/images/imagespdf.jpg',
                    'imageUrl' => Yii::app()->theme->baseUrl .'/icons/pdfBW.png',
                    'options'=>array('target'=>'_blank')
                ),
            )
        )
    )
));


?>